{% extends "base.html" %}

{% block content %}
  <center>
  <h2>Last 100 {{ app_name }} revisions status</h2>
  <table border="1" cellpadding="5">
  <tr bgcolor="#CCCCFF">
    <td><b>Revision</b></td>
    <td><b>Git Hash</b></td>
    <td><b>When</b></td>
    <td><b>Status</b></td>
    <td><b>Failed steps</b></td>
  </tr>
  {% for revision in revisions %}
    <tr>
      <td>{{ revision.revision }}</td>
      <td>{{ revision.git_hash }}</td>
      <td>{{ revision.date|date:"D M d, H:i T " }}</td>
      <td {% if revision.status %}
            bgcolor="#88FF88">SUCCESS
          {% else %}
            bgcolor="#FF8888">FAILURE
          {% endif %}
      </td>
      <td>{{ revision.failed_steps }}</td>
    </tr>
  {% endfor %}
   </table>
  </center>
{% endblock %}
